package com.wqiuqiu.gulimall.cart.controller;


import com.wqiuqiu.common.R;
import com.wqiuqiu.gulimall.cart.service.CartService;
import com.wqiuqiu.gulimall.cart.vo.CartItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("cart/member")
public class MemberController {

    @Autowired
    CartService cartService;

    @GetMapping("/getMemberCart")
    public R getMemberCart() {
        List<CartItemVo> vos = cartService.getMemberCart();
        return R.ok().setData(vos);
    }
}
